#include<iostream>
#include<opencv2/opencv.hpp>
using namespace std;
using namespace cv;
int main(void)
{
    Mat image;
    VideoCapture cap;
    cap.open(0);
    
    cout << "start rrabbing" << endl;
    while(1)
    {
     
      cap.read(image);
      imshow("camera",image);
      waitKey(20);
      if(!cvGetWindowHandle("camera"))
      {
      break;
      }
    }
    return 0;
}
